<?php 

class QpidSqlDataProvider extends CSqlDataProvider {
	public function fetchData() {
		$data = parent::fetchData();
		foreach ($data as $k => $item) {
			$data[$k] = (object) $item;
		}
		$this->setData($data);
		return $data;
	}
	
	/**
	 * Fetches the data item keys from the persistent data storage.
	 * @return array list of data item keys.
	 */
	protected function fetchKeys()
	{
		$keys=array();
		foreach($this->getData() as $i=>$data)
			$data = (array) $data;
			$keys[$i]=$data[$this->keyField];
		return $keys;
	}
}